x86/percpu: Force INVALID_PERCPU_AREA into the non-canonical address region
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 4 Oct 2013 10:24:34 +0000 (12:24 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Oct 2013 10:24:34 +0000 (12:24 +0200)
commit7cfb0053629c4dd1a6f01dc43cca7c0c25b8b7bf
tree601e6c122d3e3f97c8da982a28db16f27e9bfba5
parent0aa27ce3351f7eb09d13e863a1d5f303086aa32a
x86/percpu: Force INVALID_PERCPU_AREA into the non-canonical address region

This causes accidental uses of per_cpu() on a pcpu with an INVALID_PERCPU_AREA
to result in a #GF for attempting to access the middle of the non-canonical
virtual address region.

This is preferable to the current behaviour, where incorrect use of per_cpu()
will result in an effective NULL structure dereference which has security
implication in the context of PV guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/percpu.c